#!/bin/bash

WORKDIR=$(cd $(dirname "$0");pwd)
cd $WORKDIR
echo "当前工作目录 : $WORKDIR"

TAG="v0.0.1"
if [ -n "$1" ]; then
  TAG=$1
fi

MANAGER_DOCKER_IMAGE=www.registry.it/gvcloud/gvcloud-manager:$TAG
MANAGER_DOCKER_IMAGE=${MANAGER_DOCKER_IMAGE//\//\\/}
echo "Update Image : ${MANAGER_DOCKER_IMAGE}"

sed "s/MANAGER_DOCKER_IMAGE/${MANAGER_DOCKER_IMAGE}/g" gvcloud-manager-deployment.yaml.tpl > k8s/yaml/gvcloud-manager-deployment.yaml

